How to restore a iMac G5 to factory settings
How to restore a iMac G5 to factory settings
How to restore a iMac G5 to factory settings
You will need the original software discs that came with your computer when it was new. If you do not have them, then you can contact Apple Support to see if you can purchase replacements. If Apple does not have any available, then you will have to try sources such as eBay or Amazon.
Contacting Apple Customer and Support Service
As for the basic process: Seven Steps to Take Before Selling, Giving Away a Mac. Once you have erased the internal disk using Disk Utility, then you install a fresh copy of OS X.
How to restore a iMac G5 to factory settings